﻿using Basic.Base.Serialization;
using Basic.EventBus.Attributes;

namespace Basic.EventBus.Eventbus
{
    public interface ISubscriberHandler
    {

        ///// <summary>
        ///// RabbitMQ:RoutingKey;Kafka:MessageKey
        ///// </summary>
        //string Key { get; }
        //string Topic { get; }
        //string Group { get; }

        EventTopicAttribute Attribute { get; }
        Type MessageType { get; }
        ISerializer Serializer { get; }

        public CancellationTokenSource TokenSource { get; }

        Task<bool> HandleMessage(byte[] message);

    }
}